3.222 \(\int (a-a \sec ^2(c+d x))^{3/2} \, dx\)

Optimal. Leaf size=64 \[ -\frac{a \tan (c+d x) \sqrt{-a \tan ^2(c+d x)}}{2 d}-\frac{a \cot (c+d x) \sqrt{-a \tan ^2(c+d x)} \log (\cos (c+d x))}{d} \]

[Out]

-((a*Cot[c + d*x]*Log[Cos[c + d*x]]*Sqrt[-(a*Tan[c + d*x]^2)])/d) - (a*Tan[c + d*x]*Sqrt[-(a*Tan[c + d*x]^2)])
/(2*d)

________________________________________________________________________________________

Rubi [A]  time = 0.0407729, antiderivative size = 64, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 17, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.235, Rules used = {4121, 3658, 3473, 3475} \[ -\frac{a \tan (c+d x) \sqrt{-a \tan ^2(c+d x)}}{2 d}-\frac{a \cot (c+d x) \sqrt{-a \tan ^2(c+d x)} \log (\cos (c+d x))}{d} \]

Antiderivative was successfully verified.

[In]

Int[(a - a*Sec[c + d*x]^2)^(3/2),x]

[Out]

-((a*Cot[c + d*x]*Log[Cos[c + d*x]]*Sqrt[-(a*Tan[c + d*x]^2)])/d) - (a*Tan[c + d*x]*Sqrt[-(a*Tan[c + d*x]^2)])
/(2*d)

Rule 4121

Int[(u_.)*((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> Int[ActivateTrig[u*(b*tan[e + f*x]^2)^p]
, x] /; FreeQ[{a, b, e, f, p}, x] && EqQ[a + b, 0]

Rule 3658

Int[(u_.)*((b_.)*tan[(e_.) + (f_.)*(x_)]^(n_))^(p_), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Di
st[((b*ff^n)^IntPart[p]*(b*Tan[e + f*x]^n)^FracPart[p])/(Tan[e + f*x]/ff)^(n*FracPart[p]), Int[ActivateTrig[u]
*(Tan[e + f*x]/ff)^(n*p), x], x]] /; FreeQ[{b, e, f, n, p}, x] &&  !IntegerQ[p] && IntegerQ[n] && (EqQ[u, 1] |
| MatchQ[u, ((d_.)*(trig_)[e + f*x])^(m_.) /; FreeQ[{d, m}, x] && MemberQ[{sin, cos, tan, cot, sec, csc}, trig
]])

Rule 3473

Int[((b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*(b*Tan[c + d*x])^(n - 1))/(d*(n - 1)), x] - Dis
t[b^2, Int[(b*Tan[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1]

Rule 3475

Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[Log[RemoveContent[Cos[c + d*x], x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin{align*} \int \left (a-a \sec ^2(c+d x)\right )^{3/2} \, dx &=\int \left (-a \tan ^2(c+d x)\right )^{3/2} \, dx\\ &=-\left (\left (a \cot (c+d x) \sqrt{-a \tan ^2(c+d x)}\right ) \int \tan ^3(c+d x) \, dx\right )\\ &=-\frac{a \tan (c+d x) \sqrt{-a \tan ^2(c+d x)}}{2 d}+\left (a \cot (c+d x) \sqrt{-a \tan ^2(c+d x)}\right ) \int \tan (c+d x) \, dx\\ &=-\frac{a \cot (c+d x) \log (\cos (c+d x)) \sqrt{-a \tan ^2(c+d x)}}{d}-\frac{a \tan (c+d x) \sqrt{-a \tan ^2(c+d x)}}{2 d}\\ \end{align*}

Mathematica [A]  time = 0.107481, size = 48, normalized size = 0.75 \[ \frac{\cot ^3(c+d x) \left (-a \tan ^2(c+d x)\right )^{3/2} \left (\tan ^2(c+d x)+2 \log (\cos (c+d x))\right )}{2 d} \]

Antiderivative was successfully verified.

[In]

Integrate[(a - a*Sec[c + d*x]^2)^(3/2),x]

[Out]

(Cot[c + d*x]^3*(-(a*Tan[c + d*x]^2))^(3/2)*(2*Log[Cos[c + d*x]] + Tan[c + d*x]^2))/(2*d)

________________________________________________________________________________________

Maple [B]  time = 0.264, size = 145, normalized size = 2.3 \begin{align*} -{\frac{\cos \left ( dx+c \right ) }{2\,d \left ( \sin \left ( dx+c \right ) \right ) ^{3}} \left ( 2\, \left ( \cos \left ( dx+c \right ) \right ) ^{2}\ln \left ( 2\, \left ( \cos \left ( dx+c \right ) +1 \right ) ^{-1} \right ) -2\, \left ( \cos \left ( dx+c \right ) \right ) ^{2}\ln \left ({\frac{1-\cos \left ( dx+c \right ) +\sin \left ( dx+c \right ) }{\sin \left ( dx+c \right ) }} \right ) -2\, \left ( \cos \left ( dx+c \right ) \right ) ^{2}\ln \left ( -{\frac{-1+\cos \left ( dx+c \right ) +\sin \left ( dx+c \right ) }{\sin \left ( dx+c \right ) }} \right ) + \left ( \cos \left ( dx+c \right ) \right ) ^{2}-1 \right ) \left ( -{\frac{a \left ( \sin \left ( dx+c \right ) \right ) ^{2}}{ \left ( \cos \left ( dx+c \right ) \right ) ^{2}}} \right ) ^{{\frac{3}{2}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a-a*sec(d*x+c)^2)^(3/2),x)

[Out]

-1/2/d*(2*cos(d*x+c)^2*ln(2/(cos(d*x+c)+1))-2*cos(d*x+c)^2*ln((1-cos(d*x+c)+sin(d*x+c))/sin(d*x+c))-2*cos(d*x+
c)^2*ln(-(-1+cos(d*x+c)+sin(d*x+c))/sin(d*x+c))+cos(d*x+c)^2-1)*cos(d*x+c)*(-a*sin(d*x+c)^2/cos(d*x+c)^2)^(3/2
)/sin(d*x+c)^3

________________________________________________________________________________________

Maxima [A]  time = 1.48758, size = 54, normalized size = 0.84 \begin{align*} -\frac{\sqrt{-a} a \tan \left (d x + c\right )^{2} - \sqrt{-a} a \log \left (\tan \left (d x + c\right )^{2} + 1\right )}{2 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a-a*sec(d*x+c)^2)^(3/2),x, algorithm="maxima")

[Out]

-1/2*(sqrt(-a)*a*tan(d*x + c)^2 - sqrt(-a)*a*log(tan(d*x + c)^2 + 1))/d

________________________________________________________________________________________

Fricas [A]  time = 0.528953, size = 167, normalized size = 2.61 \begin{align*} -\frac{{\left (2 \, a \cos \left (d x + c\right )^{2} \log \left (-\cos \left (d x + c\right )\right ) + a\right )} \sqrt{\frac{a \cos \left (d x + c\right )^{2} - a}{\cos \left (d x + c\right )^{2}}}}{2 \, d \cos \left (d x + c\right ) \sin \left (d x + c\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a-a*sec(d*x+c)^2)^(3/2),x, algorithm="fricas")

[Out]

-1/2*(2*a*cos(d*x + c)^2*log(-cos(d*x + c)) + a)*sqrt((a*cos(d*x + c)^2 - a)/cos(d*x + c)^2)/(d*cos(d*x + c)*s
in(d*x + c))

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (- a \sec ^{2}{\left (c + d x \right )} + a\right )^{\frac{3}{2}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a-a*sec(d*x+c)**2)**(3/2),x)

[Out]

Integral((-a*sec(c + d*x)**2 + a)**(3/2), x)

________________________________________________________________________________________

Giac [B]  time = 1.40452, size = 185, normalized size = 2.89 \begin{align*} -\frac{\sqrt{-a} a \log \left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + \frac{1}{\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2}} + 2\right ) - \sqrt{-a} a \log \left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + \frac{1}{\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2}} - 2\right ) + \frac{{\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + \frac{1}{\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2}}\right )} \sqrt{-a} a - 6 \, \sqrt{-a} a}{\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + \frac{1}{\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2}} - 2}}{2 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a-a*sec(d*x+c)^2)^(3/2),x, algorithm="giac")

[Out]

-1/2*(sqrt(-a)*a*log(tan(1/2*d*x + 1/2*c)^2 + 1/tan(1/2*d*x + 1/2*c)^2 + 2) - sqrt(-a)*a*log(tan(1/2*d*x + 1/2
*c)^2 + 1/tan(1/2*d*x + 1/2*c)^2 - 2) + ((tan(1/2*d*x + 1/2*c)^2 + 1/tan(1/2*d*x + 1/2*c)^2)*sqrt(-a)*a - 6*sq
rt(-a)*a)/(tan(1/2*d*x + 1/2*c)^2 + 1/tan(1/2*d*x + 1/2*c)^2 - 2))/d